<template>
    <div class="box">deprecated</div>
    <div>这里是些过时的写法，但仍要保留兼容性</div>
    <el-form-renderer ref="form" label-width="100px" :content="content">
        <el-button @click="getFormValue">getFormValue</el-button>
    </el-form-renderer>
</template>

<script setup>
import { reactive, ref } from "vue";
import elFormRenderer from "../components/femessage/el-form-renderer.vue";

const form = ref();


const content = reactive(
    [
        {
            type: 'radioGroup', // 推荐写作 radio-group
            $id: 'resource', // 推荐不加 $
            label: 'resource',
            options: [{
                label: 'resourceA'
            }, {
                label: 'resourceB'
            }],
            rules: [
                { required: true, message: 'miss resource', trigger: 'change' }
            ]
        }
    ]);
const getFormValue = () => {
    let v = form.value.getFormValue();
    console.log(v);
};

</script>
